﻿<?xml version="1.0" encoding="utf-8"?>
<Witd:WITD application="Work item type editor" version="1.0" xmlns:Witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
  <WORKITEMTYPE name="Card">
    <DESCRIPTION>Tracks an activity the user will be able to perform with the product</DESCRIPTION>
    <GLOBALLISTS>
      <GLOBALLIST name="Kanban Card Types">
        <LISTITEM value="Work Task" />
        <LISTITEM value="Team Task" />
        <LISTITEM value="Problem" />
      </GLOBALLIST>
      <GLOBALLIST name="Kanban States">
        <LISTITEM value="Analyze" />
        <LISTITEM value="Implement" />
        <LISTITEM value="Test" />
        <LISTITEM value="Review" />
      </GLOBALLIST>
    </GLOBALLISTS>
    <FIELDS>
      <FIELD name="Id" refname="System.Id" type="Integer" reportable="dimension" />
      <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">
        <REQUIRED />
        <HELPTEXT>What the user will be able to do when this is implemented</HELPTEXT>
      </FIELD>
      <FIELD name="Description" refname="System.Description" type="PlainText">
        <HELPTEXT>Description or reference to the story that must work for this work to be considered complete</HELPTEXT>
      </FIELD>
      <FIELD name="Story Points" refname="Microsoft.VSTS.Scheduling.StoryPoints" type="Double" reportable="measure">
        <HELPTEXT>The size of work estimated for implementing this user story</HELPTEXT>
      </FIELD>
      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" reportable="dimension" syncnamechanges="true">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
        <HELPTEXT>The person currently working on this story</HELPTEXT>
      </FIELD>
      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath" reportable="dimension">
        <HELPTEXT>The area of the product with which this user story is associated</HELPTEXT>
      </FIELD>
      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath" reportable="dimension">
        <HELPTEXT>The iteration within which this user story will be implemented</HELPTEXT>
      </FIELD>
      <FIELD name="History" refname="System.History" type="History">
        <HELPTEXT>Discussion thread plus automatic record of changes</HELPTEXT>
      </FIELD>
      <FIELD name="State" refname="System.State" type="String" reportable="dimension">
        <HELPTEXT>New = New work not yet activated; Active = work remains to be done; Resolved = awaiting acceptance tests; Closed = acceptance tests passed</HELPTEXT>
      </FIELD>
      <FIELD name="Reason" refname="System.Reason" type="String" reportable="dimension">
        <HELPTEXT>The reason why the story is in its current state</HELPTEXT>
      </FIELD>
      <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime" reportable="dimension" />
      <FIELD name="Changed By" refname="System.ChangedBy" type="String" reportable="dimension" syncnamechanges="true">
        <VALIDUSER />
        <ALLOWEXISTINGVALUE />
      </FIELD>
      <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime" reportable="dimension" />
      <FIELD name="Created By" refname="System.CreatedBy" type="String" reportable="dimension" syncnamechanges="true" />
      <FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
        <WHENCHANGED field="System.State">
          <SERVERDEFAULT from="clock" />
        </WHENCHANGED>
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Activated Date" refname="Microsoft.VSTS.Common.ActivatedDate" type="DateTime" reportable="dimension">
        <WHEN field="System.State" value="In Progress">
          <REQUIRED />
        </WHEN>
        <WHEN field="System.State" value="Complete">
          <REQUIRED />
        </WHEN>
      </FIELD>
      <FIELD name="Activated By" refname="Microsoft.VSTS.Common.ActivatedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHEN field="System.State" value="In Progress">
          <REQUIRED />
        </WHEN>
        <WHEN field="System.State" value="Complete">
          <REQUIRED />
        </WHEN>
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
      </FIELD>
      <FIELD name="Resolved Date" refname="Microsoft.VSTS.Common.ResolvedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Resolved By" refname="Microsoft.VSTS.Common.ResolvedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <ALLOWEXISTINGVALUE />
      </FIELD>
      <FIELD name="Resolved Reason" refname="Microsoft.VSTS.Common.ResolvedReason" type="String" reportable="dimension" />
      <FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
        <WHEN field="System.State" value="Complete">
          <REQUIRED />
        </WHEN>
      </FIELD>
      <FIELD name="Closed By" refname="Microsoft.VSTS.Common.ClosedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHEN field="System.State" value="Complete">
          <REQUIRED />
        </WHEN>
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
      </FIELD>
      <FIELD name="Risk" refname="Microsoft.VSTS.Common.Risk" type="String" reportable="dimension">
        <ALLOWEDVALUES>
          <LISTITEM value="1 - High" />
          <LISTITEM value="2 - Medium" />
          <LISTITEM value="3 - Low" />
        </ALLOWEDVALUES>
        <HELPTEXT>Uncertainty in requirement or design</HELPTEXT>
      </FIELD>
      <FIELD name="Stack Rank" refname="Microsoft.VSTS.Common.StackRank" type="Double" reportable="dimension">
        <HELPTEXT>Work first on items with lower-valued stack rank. Set in triage.</HELPTEXT>
      </FIELD>
      <FIELD name="Start Date" refname="Microsoft.VSTS.Scheduling.StartDate" type="DateTime" reportable="dimension">
        <HELPTEXT>The start date for implementation of this story</HELPTEXT>
      </FIELD>
      <FIELD name="Finish Date" refname="Microsoft.VSTS.Scheduling.FinishDate" type="DateTime" reportable="dimension">
        <HELPTEXT>The completion date for all the tasks implementing this story</HELPTEXT>
      </FIELD>
      <!-- **************** Team Build Integration Fields **************  -->
      <FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
        <SUGGESTEDVALUES>
          <LISTITEM value="&lt;None&gt;" />
        </SUGGESTEDVALUES>
        <HELPTEXT>The build in which the bug was fixed</HELPTEXT>
      </FIELD>
      <!-- **************** Kanban Fields **************  -->
      <FIELD name="Kanban Process Step" refname="Microsoft.VSTS.Kanban.ProcessStep" type="String" reportable="dimension">
        <WHEN value="Backlog" field="System.State">
          <ALLOWEDVALUES>
            <LISTITEM value="Backlog" />
          </ALLOWEDVALUES>
          <COPY from="value" value="Backlog" />
        </WHEN>
        <WHEN value="In Progress" field="System.State">
          <ALLOWEDVALUES>
            <GLOBALLIST name="Kanban States" />
          </ALLOWEDVALUES>
          <REQUIRED />
        </WHEN>
        <WHEN value="Complete" field="System.State">
          <ALLOWEDVALUES>
            <LISTITEM value="Complete" />
          </ALLOWEDVALUES>
          <COPY from="value" value="Complete" />
        </WHEN>
        <WHEN value="Removed" field="System.State">
          <EMPTY />
        </WHEN>
        <HELPTEXT>The state of this item as presented on the Kanban Board</HELPTEXT>
      </FIELD>
      <FIELD name="Kanban Process Step Done" refname="Microsoft.VSTS.Kanban.ProcessStepDone" type="String" reportable="dimension">
        <WHEN value="In Progress" field="System.State">
          <ALLOWEDVALUES>
            <LISTITEM value="No" />
            <LISTITEM value="Yes" />
          </ALLOWEDVALUES>
        </WHEN>
        <WHENCHANGED field="Microsoft.VSTS.Kanban.ProcessStep">
          <COPY from="value" value="No" />
        </WHENCHANGED>
        <WHEN value="Backlog" field="System.State">
          <EMPTY />
        </WHEN>
        <WHEN value="Complete" field="System.State">
          <EMPTY />
        </WHEN>
        <WHEN value="Removed" field="System.State">
          <EMPTY />
        </WHEN>
        <HELPTEXT>Yes = This item is ready to be pulled into the next state Process Step.</HELPTEXT>
      </FIELD>
      <FIELD name="Kanban Card Type" refname="Microsoft.VSTS.Kanban.CardType" type="String" reportable="dimension">
        <ALLOWEDVALUES>
          <GLOBALLIST name="Kanban Card Types" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="Work Task" />
        <REQUIRED />
        <HELPTEXT>The type of card that is moving across the Kanban board</HELPTEXT>
      </FIELD>
      <FIELD name="Blocked" refname="Microsoft.VSTS.Kanban.Blocked" type="String" reportable="dimension">
        <ALLOWEDVALUES>
          <LISTITEM value="No" />
          <LISTITEM value="Yes" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="No" />
      </FIELD>
      <FIELD name="Blocked Description" refname="Microsoft.VSTS.Kanban.BlockedDescription" type="HTML" />
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="Backlog">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="In Progress">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Complete" />
        <STATE value="Removed" />
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="Backlog">
          <REASONS>
            <DEFAULTREASON value="New" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Backlog" to="In Progress">
          <REASONS>
            <DEFAULTREASON value="Work started" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser" />
            </FIELD>
          </FIELDS>
          <ACTIONS>
            <ACTION value="Microsoft.VSTS.Actions.Checkin" />
          </ACTIONS>
        </TRANSITION>
        <TRANSITION from="In Progress" to="Complete">
          <REASONS>
            <DEFAULTREASON value="Work finished" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="In Progress" to="Backlog">
          <REASONS>
            <DEFAULTREASON value="Postponed" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Complete" to="Backlog">
          <REASONS>
            <REASON value="Closed in error" />
            <DEFAULTREASON value="Reintroduced in Scope" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Complete" to="In Progress">
          <REASONS>
            <DEFAULTREASON value="Closed in error" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Backlog" to="Removed">
          <REASONS>
            <REASON value="Obsolete" />
            <REASON value="Not important" />
            <REASON value="Other" />
            <REASON value="Duplicated" />
            <REASON value="Out of Scope" />
            <DEFAULTREASON value="Rejected" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Removed" to="Backlog">
          <REASONS>
            <DEFAULTREASON value="Reconsidered" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="In Progress" to="Removed">
          <REASONS>
            <DEFAULTREASON value="Obsolete" />
          </REASONS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout>
        <Group Margin="(0,0,0,5)">
          <Column PercentWidth="100">
            <Control FieldName="System.Title" Type="FieldControl" ControlFontSize="large" EmptyText="&lt;Enter title here&gt;" LabelPosition="Top" />
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="70">
            <TabGroup>
              <Tab Label="Details">
                <Control FieldName="System.Description" Type="HtmlFieldControl" Label="" LabelPosition="Top" MinimumSize="(0,0)" Dock="Fill" />
              </Tab>
              <Tab Label="Feedback">
                <Control Type="LinksControl" Name="Feedback" Label="Feedback on this Card:" LabelPosition="Top">
                  <LinksControlOptions>
                    <WorkItemLinkFilters FilterType="include">
                      <Filter LinkType="Microsoft.VSTS.Common.Feedback" FilterOn="forwardname" />
                    </WorkItemLinkFilters>
                    <WorkItemTypeFilters FilterType="include">
                      <Filter WorkItemType="Feedback" />
                    </WorkItemTypeFilters>
                    <ExternalLinkFilters FilterType="excludeAll" />
                    <LinkColumns>
                      <LinkColumn RefName="System.ID" />
                      <LinkColumn RefName="System.WorkItemType" />
                      <LinkColumn RefName="System.Title" />
                      <!--<LinkColumn RefName="Microsoft.VSTS.Common.SubmittedBy" />-->
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                      <LinkColumn LinkAttribute="System.Links.Comment" />
                    </LinkColumns>
                  </LinksControlOptions>
                </Control>
              </Tab>
              <Tab Label="Test Cases">
                <Control Type="LinksControl" Name="TestedBy" Label="Test &amp;Cases testing this Card:" LabelPosition="Top">
                  <LinksControlOptions>
                    <WorkItemLinkFilters FilterType="include">
                      <Filter LinkType="Microsoft.VSTS.Common.TestedBy" FilterOn="forwardname" />
                    </WorkItemLinkFilters>
                    <WorkItemTypeFilters FilterType="include">
                      <Filter WorkItemType="Test Case" />
                    </WorkItemTypeFilters>
                    <ExternalLinkFilters FilterType="excludeAll" />
                    <LinkColumns>
                      <LinkColumn RefName="System.ID" />
                      <LinkColumn RefName="System.WorkItemType" />
                      <LinkColumn RefName="System.Title" />
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                      <LinkColumn LinkAttribute="System.Links.Comment" />
                    </LinkColumns>
                  </LinksControlOptions>
                </Control>
              </Tab>
              <Tab Label="All Links">
                <Control Type="LinksControl" Name="GeneralLinks" LabelPosition="Top">
                  <LinksControlOptions>
                    <LinkColumns>
                      <LinkColumn RefName="System.ID" />
                      <LinkColumn RefName="System.WorkItemType" />
                      <LinkColumn RefName="System.Title" />
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                      <LinkColumn LinkAttribute="System.Links.Comment" />
                    </LinkColumns>
                    <WorkItemLinkFilters FilterType="includeAll" />
                    <ExternalLinkFilters FilterType="includeAll" />
                    <WorkItemTypeFilters FilterType="includeAll" />
                  </LinksControlOptions>
                </Control>
              </Tab>
              <Tab Label="Attachments">
                <Control Type="AttachmentsControl" LabelPosition="Top" />
              </Tab>
              <Tab Label="History">
                <Control FieldName="System.History" Type="WorkItemLogControl" Label="&amp;History:" LabelPosition="Top" Dock="Fill" />
              </Tab>
              <Tab Label="Blocked">
                <Control FieldName="Microsoft.VSTS.Kanban.BlockedDescription" Type="HtmlFieldControl" Label="Description and resolution notes:" LabelPosition="Top" Dock="Fill" />
              </Tab>
            </TabGroup>
          </Column>
          <Column PercentWidth="30">
            <Group Margin="(5,0,0,0)">
              <Column PercentWidth="100">
                <Group Label="Status">
                  <Column PercentWidth="100">
                    <Control FieldName="System.AssignedTo" EmptyText="&lt;No one&gt;" Type="FieldControl" Label="Assi&amp;gned To:" LabelPosition="Left" />
                    <Control FieldName="System.State" Type="FieldControl" Label="&amp;State:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Kanban.ProcessStep" Type="FieldControl" Label="Process Step:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Kanban.ProcessStepDone" Type="FieldControl" Label="Process Step Done:" LabelPosition="Left" />
                  </Column>
                </Group>
                <Group Label="Planning">
                  <Column PercentWidth="100">
                    <Control FieldName="Microsoft.VSTS.Scheduling.StoryPoints" Type="FieldControl" Label="Story Points:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Common.Risk" Type="FieldControl" Label="Risk:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Common.StackRank" Type="FieldControl" Label="Stack Rank:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Kanban.Blocked" Type="FieldControl" Label="Blocked?:" LabelPosition="Left" />
                  </Column>
                </Group>
                <Group Label="Classification">
                  <Column PercentWidth="100">
                    <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&amp;Area:" LabelPosition="Left" />
                    <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="&amp;Iteration:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Kanban.CardType" Type="FieldControl" Label="Card Type:" LabelPosition="Left" />
                  </Column>
                </Group>
                <Group Label="Tracking">
                  <Column PercentWidth="100">
                    <Control FieldName="System.CreatedDate" Type="FieldControl" Label="Created Date:" LabelPosition="Left" Dock="Bottom" />
                    <Control FieldName="System.CreatedBy" Type="FieldControl" Label="Created By:" LabelPosition="Left" Dock="Bottom" />
                    <Control FieldName="Microsoft.VSTS.Common.ActivatedDate" Type="FieldControl" Label="Activated Date:" LabelPosition="Left" Dock="Bottom" />
                    <Control FieldName="Microsoft.VSTS.Common.ActivatedBy" Type="FieldControl" Label="Activated By:" LabelPosition="Left" Dock="Bottom" />
                    <Control FieldName="Microsoft.VSTS.Common.ClosedDate" Type="FieldControl" Label="Closed Date:" LabelPosition="Left" Dock="Bottom" />
                    <Control FieldName="Microsoft.VSTS.Common.ClosedBy" Type="FieldControl" Label="Closed By:" LabelPosition="Left" Dock="Bottom" />
                  </Column>
                </Group>
              </Column>
            </Group>
          </Column>
        </Group>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</Witd:WITD>